<h1>Listing answers</h1>

<table>
  <tr>
    <th>Task</th>
    <th>User</th>
    <th>Description</th>
    <th>Delivered at</th>
    <th>Correction value</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @answers.each do |answer| %>
  <tr>
    <td><%= answer.task.title %></td>
    <td><%= answer.user.name %></td>
    <td><%= answer.description %></td>
    <td><%= answer.delivered_at %></td>
    <td><%= answer.correction_value %></td>
    <td><%= link_to 'Show', answer %></td>
    <td><%= link_to 'Edit', edit_answer_path(answer) %></td>
    <td><%= link_to 'Destroy', answer, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Answer', new_answer_path %>
